1. Field of the Invention
The present invention relates to an image processing apparatus and an image processing method, and in particular relates to a technique for pixel correction.
2. Description of the Related Art
Image capturing apparatuses such as digital cameras capture images use an image sensor such as a CMOS sensor, but since multiple pixels are provided in the image sensor, it is common for defective pixels to exist due to structural causes, causes in the process of manufacturing, external causes after manufacturing, and the like. As a technique for correcting a value of this kind of defective pixel, there is known to be a method of using a pixel value at a position of a defective pixel that is estimated based on normal pixels in the periphery of the defective pixel.
Also, pixels whose pixel values need to be obtained similarly to the defective pixel also exist, although they are not defective pixels. One example is a focus detection pixel such as that disclosed in Japanese Patent No. 4797606. The focus detection pixel disclosed in Japanese Patent No. 4797606 has a light blocking layer that restricts a luminous flux incidence range. Also, no color filter is provided therein. Since the focus detection pixels are provided among the imaging pixels in the image sensor, it is necessary to obtain the pixel values for the positions of the focus detection pixels from the pixel values of the imaging pixels in the periphery thereof in the case of generating a captured image. Hereinafter, in the present specification, a pixel whose pixel value needs to be obtained as with a defective pixel will be referred to as a correction target pixel or a pixel to be corrected, and the process of obtaining the pixel value of a correction target pixel or a pixel to be corrected will be referred to as pixel correction.
The focus detection pixels are also treated similarly to defective pixels, but since they are arranged regularly, there have been cases where the accuracy of correcting defective pixels (imaging pixels) included in the same direction decreases in the case where the focus detection pixels are arranged in one direction, for example.